3.24.75 \(\int \frac {f+g x}{(a+b x+c x^2)^3} \, dx\) [2375]

3.24.75.1 Optimal result
3.24.75.2 Mathematica [A] (verified)
3.24.75.3 Rubi [A] (verified)
3.24.75.4 Maple [A] (verified)
3.24.75.5 Fricas [B] (verification not implemented)
3.24.75.6 Sympy [B] (verification not implemented)
3.24.75.7 Maxima [F(-2)]
3.24.75.8 Giac [A] (verification not implemented)
3.24.75.9 Mupad [B] (verification not implemented)

3.24.75.1 Optimal result

Integrand size = 18, antiderivative size = 131 \[ \int \frac {f+g x}{\left (a+b x+c x^2\right )^3} \, dx=-\frac {b f-2 a g+(2 c f-b g) x}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}+\frac {3 (2 c f-b g) (b+2 c x)}{2 \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac {6 c (2 c f-b g) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{5/2}} \]

output
1/2*(-b*f+2*a*g-(-b*g+2*c*f)*x)/(-4*a*c+b^2)/(c*x^2+b*x+a)^2+3/2*(-b*g+2*c 
*f)*(2*c*x+b)/(-4*a*c+b^2)^2/(c*x^2+b*x+a)-6*c*(-b*g+2*c*f)*arctanh((2*c*x 
+b)/(-4*a*c+b^2)^(1/2))/(-4*a*c+b^2)^(5/2)
 
3.24.75.2 Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.98 \[ \int \frac {f+g x}{\left (a+b x+c x^2\right )^3} \, dx=\frac {\frac {\left (b^2-4 a c\right ) (-b f+2 a g-2 c f x+b g x)}{(a+x (b+c x))^2}+\frac {3 (2 c f-b g) (b+2 c x)}{a+x (b+c x)}-\frac {12 c (-2 c f+b g) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}}{2 \left (b^2-4 a c\right )^2} \]

input
Integrate[(f + g*x)/(a + b*x + c*x^2)^3,x]
 
output
(((b^2 - 4*a*c)*(-(b*f) + 2*a*g - 2*c*f*x + b*g*x))/(a + x*(b + c*x))^2 + 
(3*(2*c*f - b*g)*(b + 2*c*x))/(a + x*(b + c*x)) - (12*c*(-2*c*f + b*g)*Arc 
Tan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c])/(2*(b^2 - 4*a*c)^ 
2)
 
3.24.75.3 Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {1159, 1086, 1083, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {f+g x}{\left (a+b x+c x^2\right )^3} \, dx\)

\(\Big \downarrow \) 1159

\(\displaystyle -\frac {3 (2 c f-b g) \int \frac {1}{\left (c x^2+b x+a\right )^2}dx}{2 \left (b^2-4 a c\right )}-\frac {-2 a g+x (2 c f-b g)+b f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}\)

\(\Big \downarrow \) 1086

\(\displaystyle -\frac {3 (2 c f-b g) \left (-\frac {2 c \int \frac {1}{c x^2+b x+a}dx}{b^2-4 a c}-\frac {b+2 c x}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}\right )}{2 \left (b^2-4 a c\right )}-\frac {-2 a g+x (2 c f-b g)+b f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}\)

\(\Big \downarrow \) 1083

\(\displaystyle -\frac {3 (2 c f-b g) \left (\frac {4 c \int \frac {1}{b^2-(b+2 c x)^2-4 a c}d(b+2 c x)}{b^2-4 a c}-\frac {b+2 c x}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}\right )}{2 \left (b^2-4 a c\right )}-\frac {-2 a g+x (2 c f-b g)+b f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}\)

\(\Big \downarrow \) 219

\(\displaystyle -\frac {3 (2 c f-b g) \left (\frac {4 c \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac {b+2 c x}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}\right )}{2 \left (b^2-4 a c\right )}-\frac {-2 a g+x (2 c f-b g)+b f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}\)

input
Int[(f + g*x)/(a + b*x + c*x^2)^3,x]
 
output
-1/2*(b*f - 2*a*g + (2*c*f - b*g)*x)/((b^2 - 4*a*c)*(a + b*x + c*x^2)^2) - 
 (3*(2*c*f - b*g)*(-((b + 2*c*x)/((b^2 - 4*a*c)*(a + b*x + c*x^2))) + (4*c 
*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(b^2 - 4*a*c)^(3/2)))/(2*(b^2 - 4 
*a*c))
 

3.24.75.3.1 Defintions of rubi rules used

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1086
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x) 
*((a + b*x + c*x^2)^(p + 1)/((p + 1)*(b^2 - 4*a*c))), x] - Simp[2*c*((2*p + 
 3)/((p + 1)*(b^2 - 4*a*c)))   Int[(a + b*x + c*x^2)^(p + 1), x], x] /; Fre 
eQ[{a, b, c}, x] && ILtQ[p, -1]
 

rule 1159
Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol 
] :> Simp[((b*d - 2*a*e + (2*c*d - b*e)*x)/((p + 1)*(b^2 - 4*a*c)))*(a + b* 
x + c*x^2)^(p + 1), x] - Simp[(2*p + 3)*((2*c*d - b*e)/((p + 1)*(b^2 - 4*a* 
c)))   Int[(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] & 
& LtQ[p, -1] && NeQ[p, -3/2]
 
3.24.75.4 Maple [A] (verified)

Time = 0.45 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.05

method result size
default \(\frac {b f -2 a g +\left (-b g +2 c f \right ) x}{2 \left (4 a c -b^{2}\right ) \left (c \,x^{2}+b x +a \right )^{2}}+\frac {3 \left (-b g +2 c f \right ) \left (\frac {2 c x +b}{\left (4 a c -b^{2}\right ) \left (c \,x^{2}+b x +a \right )}+\frac {4 c \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\left (4 a c -b^{2}\right )^{\frac {3}{2}}}\right )}{2 \left (4 a c -b^{2}\right )}\) \(137\)
risch \(\frac {-\frac {3 \left (b g -2 c f \right ) c^{2} x^{3}}{16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}}-\frac {9 b \left (b g -2 c f \right ) c \,x^{2}}{2 \left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right )}-\frac {\left (5 a c +b^{2}\right ) \left (b g -2 c f \right ) x}{16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}}-\frac {8 a^{2} c g +a \,b^{2} g -10 a b c f +b^{3} f}{2 \left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right )}}{\left (c \,x^{2}+b x +a \right )^{2}}-\frac {3 c \ln \left (\left (32 a^{2} c^{3}-16 a \,b^{2} c^{2}+2 b^{4} c \right ) x -\left (-4 a c +b^{2}\right )^{\frac {5}{2}}+16 a^{2} b \,c^{2}-8 a \,b^{3} c +b^{5}\right ) b g}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}+\frac {6 c^{2} \ln \left (\left (32 a^{2} c^{3}-16 a \,b^{2} c^{2}+2 b^{4} c \right ) x -\left (-4 a c +b^{2}\right )^{\frac {5}{2}}+16 a^{2} b \,c^{2}-8 a \,b^{3} c +b^{5}\right ) f}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}+\frac {3 c \ln \left (\left (-32 a^{2} c^{3}+16 a \,b^{2} c^{2}-2 b^{4} c \right ) x -\left (-4 a c +b^{2}\right )^{\frac {5}{2}}-16 a^{2} b \,c^{2}+8 a \,b^{3} c -b^{5}\right ) b g}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}-\frac {6 c^{2} \ln \left (\left (-32 a^{2} c^{3}+16 a \,b^{2} c^{2}-2 b^{4} c \right ) x -\left (-4 a c +b^{2}\right )^{\frac {5}{2}}-16 a^{2} b \,c^{2}+8 a \,b^{3} c -b^{5}\right ) f}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}\) \(479\)

input
int((g*x+f)/(c*x^2+b*x+a)^3,x,method=_RETURNVERBOSE)
 
output
1/2*(b*f-2*a*g+(-b*g+2*c*f)*x)/(4*a*c-b^2)/(c*x^2+b*x+a)^2+3/2*(-b*g+2*c*f 
)/(4*a*c-b^2)*((2*c*x+b)/(4*a*c-b^2)/(c*x^2+b*x+a)+4*c/(4*a*c-b^2)^(3/2)*a 
rctan((2*c*x+b)/(4*a*c-b^2)^(1/2)))
 
3.24.75.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 548 vs. \(2 (123) = 246\).

Time = 0.36 (sec) , antiderivative size = 1116, normalized size of antiderivative = 8.52 \[ \int \frac {f+g x}{\left (a+b x+c x^2\right )^3} \, dx=\text {Too large to display} \]

input
integrate((g*x+f)/(c*x^2+b*x+a)^3,x, algorithm="fricas")
 
output
[1/2*(6*(2*(b^2*c^3 - 4*a*c^4)*f - (b^3*c^2 - 4*a*b*c^3)*g)*x^3 + 9*(2*(b^ 
3*c^2 - 4*a*b*c^3)*f - (b^4*c - 4*a*b^2*c^2)*g)*x^2 - 6*(2*a^2*c^2*f - a^2 
*b*c*g + (2*c^4*f - b*c^3*g)*x^4 + 2*(2*b*c^3*f - b^2*c^2*g)*x^3 + (2*(b^2 
*c^2 + 2*a*c^3)*f - (b^3*c + 2*a*b*c^2)*g)*x^2 + 2*(2*a*b*c^2*f - a*b^2*c* 
g)*x)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c + sqrt(b^2 
- 4*a*c)*(2*c*x + b))/(c*x^2 + b*x + a)) - (b^5 - 14*a*b^3*c + 40*a^2*b*c^ 
2)*f - (a*b^4 + 4*a^2*b^2*c - 32*a^3*c^2)*g + 2*(2*(b^4*c + a*b^2*c^2 - 20 
*a^2*c^3)*f - (b^5 + a*b^3*c - 20*a^2*b*c^2)*g)*x)/(a^2*b^6 - 12*a^3*b^4*c 
 + 48*a^4*b^2*c^2 - 64*a^5*c^3 + (b^6*c^2 - 12*a*b^4*c^3 + 48*a^2*b^2*c^4 
- 64*a^3*c^5)*x^4 + 2*(b^7*c - 12*a*b^5*c^2 + 48*a^2*b^3*c^3 - 64*a^3*b*c^ 
4)*x^3 + (b^8 - 10*a*b^6*c + 24*a^2*b^4*c^2 + 32*a^3*b^2*c^3 - 128*a^4*c^4 
)*x^2 + 2*(a*b^7 - 12*a^2*b^5*c + 48*a^3*b^3*c^2 - 64*a^4*b*c^3)*x), 1/2*( 
6*(2*(b^2*c^3 - 4*a*c^4)*f - (b^3*c^2 - 4*a*b*c^3)*g)*x^3 + 9*(2*(b^3*c^2 
- 4*a*b*c^3)*f - (b^4*c - 4*a*b^2*c^2)*g)*x^2 - 12*(2*a^2*c^2*f - a^2*b*c* 
g + (2*c^4*f - b*c^3*g)*x^4 + 2*(2*b*c^3*f - b^2*c^2*g)*x^3 + (2*(b^2*c^2 
+ 2*a*c^3)*f - (b^3*c + 2*a*b*c^2)*g)*x^2 + 2*(2*a*b*c^2*f - a*b^2*c*g)*x) 
*sqrt(-b^2 + 4*a*c)*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) 
- (b^5 - 14*a*b^3*c + 40*a^2*b*c^2)*f - (a*b^4 + 4*a^2*b^2*c - 32*a^3*c^2) 
*g + 2*(2*(b^4*c + a*b^2*c^2 - 20*a^2*c^3)*f - (b^5 + a*b^3*c - 20*a^2*b*c 
^2)*g)*x)/(a^2*b^6 - 12*a^3*b^4*c + 48*a^4*b^2*c^2 - 64*a^5*c^3 + (b^6*...
 
3.24.75.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 651 vs. \(2 (122) = 244\).

Time = 1.02 (sec) , antiderivative size = 651, normalized size of antiderivative = 4.97 \[ \int \frac {f+g x}{\left (a+b x+c x^2\right )^3} \, dx=3 c \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) \log {\left (x + \frac {- 192 a^{3} c^{4} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 144 a^{2} b^{2} c^{3} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) - 36 a b^{4} c^{2} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 3 b^{6} c \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 3 b^{2} c g - 6 b c^{2} f}{6 b c^{2} g - 12 c^{3} f} \right )} - 3 c \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) \log {\left (x + \frac {192 a^{3} c^{4} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) - 144 a^{2} b^{2} c^{3} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 36 a b^{4} c^{2} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) - 3 b^{6} c \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 3 b^{2} c g - 6 b c^{2} f}{6 b c^{2} g - 12 c^{3} f} \right )} + \frac {- 8 a^{2} c g - a b^{2} g + 10 a b c f - b^{3} f + x^{3} \left (- 6 b c^{2} g + 12 c^{3} f\right ) + x^{2} \left (- 9 b^{2} c g + 18 b c^{2} f\right ) + x \left (- 10 a b c g + 20 a c^{2} f - 2 b^{3} g + 4 b^{2} c f\right )}{32 a^{4} c^{2} - 16 a^{3} b^{2} c + 2 a^{2} b^{4} + x^{4} \cdot \left (32 a^{2} c^{4} - 16 a b^{2} c^{3} + 2 b^{4} c^{2}\right ) + x^{3} \cdot \left (64 a^{2} b c^{3} - 32 a b^{3} c^{2} + 4 b^{5} c\right ) + x^{2} \cdot \left (64 a^{3} c^{3} - 12 a b^{4} c + 2 b^{6}\right ) + x \left (64 a^{3} b c^{2} - 32 a^{2} b^{3} c + 4 a b^{5}\right )} \]

input
integrate((g*x+f)/(c*x**2+b*x+a)**3,x)
 
output
3*c*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f)*log(x + (-192*a**3*c**4*sqrt( 
-1/(4*a*c - b**2)**5)*(b*g - 2*c*f) + 144*a**2*b**2*c**3*sqrt(-1/(4*a*c - 
b**2)**5)*(b*g - 2*c*f) - 36*a*b**4*c**2*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 
 2*c*f) + 3*b**6*c*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f) + 3*b**2*c*g - 
 6*b*c**2*f)/(6*b*c**2*g - 12*c**3*f)) - 3*c*sqrt(-1/(4*a*c - b**2)**5)*(b 
*g - 2*c*f)*log(x + (192*a**3*c**4*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f 
) - 144*a**2*b**2*c**3*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f) + 36*a*b** 
4*c**2*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f) - 3*b**6*c*sqrt(-1/(4*a*c 
- b**2)**5)*(b*g - 2*c*f) + 3*b**2*c*g - 6*b*c**2*f)/(6*b*c**2*g - 12*c**3 
*f)) + (-8*a**2*c*g - a*b**2*g + 10*a*b*c*f - b**3*f + x**3*(-6*b*c**2*g + 
 12*c**3*f) + x**2*(-9*b**2*c*g + 18*b*c**2*f) + x*(-10*a*b*c*g + 20*a*c** 
2*f - 2*b**3*g + 4*b**2*c*f))/(32*a**4*c**2 - 16*a**3*b**2*c + 2*a**2*b**4 
 + x**4*(32*a**2*c**4 - 16*a*b**2*c**3 + 2*b**4*c**2) + x**3*(64*a**2*b*c* 
*3 - 32*a*b**3*c**2 + 4*b**5*c) + x**2*(64*a**3*c**3 - 12*a*b**4*c + 2*b** 
6) + x*(64*a**3*b*c**2 - 32*a**2*b**3*c + 4*a*b**5))
 
3.24.75.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {f+g x}{\left (a+b x+c x^2\right )^3} \, dx=\text {Exception raised: ValueError} \]

input
integrate((g*x+f)/(c*x^2+b*x+a)^3,x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for 
 more deta
 
3.24.75.8 Giac [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.52 \[ \int \frac {f+g x}{\left (a+b x+c x^2\right )^3} \, dx=\frac {6 \, {\left (2 \, c^{2} f - b c g\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {12 \, c^{3} f x^{3} - 6 \, b c^{2} g x^{3} + 18 \, b c^{2} f x^{2} - 9 \, b^{2} c g x^{2} + 4 \, b^{2} c f x + 20 \, a c^{2} f x - 2 \, b^{3} g x - 10 \, a b c g x - b^{3} f + 10 \, a b c f - a b^{2} g - 8 \, a^{2} c g}{2 \, {\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} {\left (c x^{2} + b x + a\right )}^{2}} \]

input
integrate((g*x+f)/(c*x^2+b*x+a)^3,x, algorithm="giac")
 
output
6*(2*c^2*f - b*c*g)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/((b^4 - 8*a*b^2 
*c + 16*a^2*c^2)*sqrt(-b^2 + 4*a*c)) + 1/2*(12*c^3*f*x^3 - 6*b*c^2*g*x^3 + 
 18*b*c^2*f*x^2 - 9*b^2*c*g*x^2 + 4*b^2*c*f*x + 20*a*c^2*f*x - 2*b^3*g*x - 
 10*a*b*c*g*x - b^3*f + 10*a*b*c*f - a*b^2*g - 8*a^2*c*g)/((b^4 - 8*a*b^2* 
c + 16*a^2*c^2)*(c*x^2 + b*x + a)^2)
 
3.24.75.9 Mupad [B] (verification not implemented)

Time = 11.66 (sec) , antiderivative size = 353, normalized size of antiderivative = 2.69 \[ \int \frac {f+g x}{\left (a+b x+c x^2\right )^3} \, dx=\frac {6\,c\,\mathrm {atan}\left (\frac {\left (\frac {6\,c^2\,x\,\left (b\,g-2\,c\,f\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}}+\frac {3\,c\,\left (b\,g-2\,c\,f\right )\,\left (16\,a^2\,b\,c^2-8\,a\,b^3\,c+b^5\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}\right )\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}{6\,c^2\,f-3\,b\,c\,g}\right )\,\left (b\,g-2\,c\,f\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}}-\frac {\frac {8\,c\,g\,a^2+g\,a\,b^2-10\,c\,f\,a\,b+f\,b^3}{2\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}+\frac {x\,\left (b^2+5\,a\,c\right )\,\left (b\,g-2\,c\,f\right )}{16\,a^2\,c^2-8\,a\,b^2\,c+b^4}+\frac {3\,c^2\,x^3\,\left (b\,g-2\,c\,f\right )}{16\,a^2\,c^2-8\,a\,b^2\,c+b^4}+\frac {9\,b\,c\,x^2\,\left (b\,g-2\,c\,f\right )}{2\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}}{x^2\,\left (b^2+2\,a\,c\right )+a^2+c^2\,x^4+2\,a\,b\,x+2\,b\,c\,x^3} \]

input
int((f + g*x)/(a + b*x + c*x^2)^3,x)
 
output
(6*c*atan((((6*c^2*x*(b*g - 2*c*f))/(4*a*c - b^2)^(5/2) + (3*c*(b*g - 2*c* 
f)*(b^5 + 16*a^2*b*c^2 - 8*a*b^3*c))/((4*a*c - b^2)^(5/2)*(b^4 + 16*a^2*c^ 
2 - 8*a*b^2*c)))*(b^4 + 16*a^2*c^2 - 8*a*b^2*c))/(6*c^2*f - 3*b*c*g))*(b*g 
 - 2*c*f))/(4*a*c - b^2)^(5/2) - ((b^3*f + a*b^2*g + 8*a^2*c*g - 10*a*b*c* 
f)/(2*(b^4 + 16*a^2*c^2 - 8*a*b^2*c)) + (x*(5*a*c + b^2)*(b*g - 2*c*f))/(b 
^4 + 16*a^2*c^2 - 8*a*b^2*c) + (3*c^2*x^3*(b*g - 2*c*f))/(b^4 + 16*a^2*c^2 
 - 8*a*b^2*c) + (9*b*c*x^2*(b*g - 2*c*f))/(2*(b^4 + 16*a^2*c^2 - 8*a*b^2*c 
)))/(x^2*(2*a*c + b^2) + a^2 + c^2*x^4 + 2*a*b*x + 2*b*c*x^3)